#include<iostream>
#include<string>
using namespace std;
string s, temp;
int main()
{
	cin >> s;
	cin >> temp;
	int ans = 0;
	while (s.find(temp) != -1) {
		ans++;
		s.erase(s.begin(), (s.begin() + 
			s.find(temp) + temp.size()));
	}
	cout << ans << endl;
	return 0;
}